package com.xujl.mvcbind.ui.db.view;

import com.xujl.fastlib.base.BaseView;
import com.xujl.fastlib.base.IControl;
import com.xujl.mvcbind.bean.AddOverTimeEntity;
import com.xujl.mvcbind.databinding.FragmentAddOverTimeBinding;
import com.xujl.mvcbind.window.DatePickerBottomWindow;


/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class AddOverTimeFragmentView extends BaseView<FragmentAddOverTimeBinding> {
    private DatePickerBottomWindow mDatePickerWindow;

    @Override
    public void init (IControl control) {
        mDatePickerWindow = new DatePickerBottomWindow(control.exposeContext());
    }

    public void setData (AddOverTimeEntity entity) {
        mBind.setEntity(entity);
    }

    public void showDatePicker () {
        mDatePickerWindow.showPopupWindow();
    }

    public void setDatePickerCallback (DatePickerBottomWindow.CompleteListener listener) {
        mDatePickerWindow.setCompleteListener(listener);
    }
}
